home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / sviluppo / svilupp2 / amphn192.lha / src / amiphone.h < prev    next >
C/C++ Source or Header  |  1996-11-16  |  4KB  |  124 lines

  1. /* AmiPhone.h */
  2.  
  3. #ifndef AMIPHONE_H
  4. #define AMIPHONE_H
  5.  
  6. #define ALL_OF_BUFFER -1
  7. #define MAXPEERNAMELENGTH 100
  8.  
  9. #define CODE_ON        1
  10. #define CODE_OFF    2
  11. #define CODE_TOGGLE    3
  12.  
  13. /* different samplers - GENERIC should work for most, but... */
  14. #define SAMPLER_GENERIC 0
  15. #define SAMPLER_GVPDSS8 1
  16. #define SAMPLER_PERFECT 2
  17. #define SAMPLER_TOCCATA 3
  18. #define SAMPLER_AMAS    4
  19. #define SAMPLER_SOMAGIC 5
  20. #define SAMPLER_AURA    6
  21. #define SAMPLER_DELFINA 7
  22. #define SAMPLER_CUSTOM  8
  23. #define SAMPLER_AHI     9
  24. #define SAMPLER_MAX    10    /* invalid!  Used for bounds checking, etc. */
  25.  
  26. /* Bit positions for the custom settings */
  27. #define SAMPBIT_POUTCLR   (1<<0)
  28. #define SAMPBIT_POUTSET   (1<<1)
  29. #define SAMPBIT_SELCLR    (1<<2)
  30. #define SAMPBIT_SELSET    (1<<3)
  31. #define SAMPBIT_BUSYCLR   (1<<4)
  32. #define SAMPBIT_BUSYSET   (1<<5)
  33.  
  34. /* Specify an input channel */
  35. #define INPUT_JACK_LEFT  1
  36. #define INPUT_JACK_RIGHT 2
  37.  
  38. /* Specify an input source */
  39. #define INPUT_SOURCE_MIC 0
  40. #define INPUT_SOURCE_EXT 1
  41.  
  42. /* different methods of selecting sampling */
  43. #define TOGGLE_TOGGLE   0
  44. #define TOGGLE_HOLD    1
  45.  
  46. /* different methods of sample timing */
  47. #define TECHNIQUE_SOFTINT    1    
  48. #define TECHNIQUE_HARDINT       2
  49.  
  50. /* macros */
  51. #define UNLESS(x)    if(!(x))
  52. #define UNTIL(x)  while(!(x))
  53. #define EXIT(m,n) {SetExitMessage(m,n);exit(n);}
  54.  
  55. /* Function prototypes */
  56. void SetExitMessage(char*,int);
  57. void CleanExit(void);
  58. void UserError(char * message);    
  59. void SetWindowTitle(char *sString);
  60. void SetMenuValues(void);
  61. void UpperCase(char *sOldString);
  62. void LowerCase(char *sOldString);
  63. void DrawMicButton(int nOptImage);
  64. void ToggleMicButton(int nCode);
  65. void ChangeTransmitMode(int nNewMode);
  66. void ProcessReply(void);
  67. void ConnectionEstablished(UBYTE ubType, int nNewPort, ULONG ulKBytesAvail);
  68. void ConnectionClosed(char * szMessage);
  69. void DrawWidthButton(int nWhich, BOOL BPressed, BOOL BReceive);
  70. void DrawHitBox(int nLeft, int nTop, int nRight, int nBottom, int nBackColor,  BOOL BPressed);
  71. void DrawWidthButtons();
  72. void SetTimer(struct timerequest * tio, int nSecs, int nMics);
  73. void UpdateReceiveDisplays();
  74. void ParseArgs(BOOL BStartedFromCLIButParseIconAnyway);
  75. void SetupGraphicsInfo(struct AmiPhoneGraphicsInfo * inf);
  76. void SubCleanExit(int nReturn);
  77. void CreateGraphicsDaemon(struct AmiPhoneGraphicsInfo * ginfo);
  78. void debug(int nSec);
  79. void DrawWindowBoxes(void);
  80. void SignalAllDaemons(void);
  81. void AddPhonePort(BOOL BAdd);
  82. void GetSamplerType(char * szWriteParam, UBYTE ubType);
  83. void GetSamplerState(char * szWriteParam);
  84. void GraphicUpdate(ULONG ulSignals);
  85. void ChangeVolumeThreshold(int nNewPercentage);
  86.  
  87. __geta4 void GraphicsTaskMain(void);
  88.  
  89. /* Functions in the graphics subtask */
  90. void SubCleanExit(int nReturn);
  91.  
  92. BOOL StartRecording(BOOL BStart, char * szOptFileName);
  93. BOOL GetPhoneArg(char * szArg, int * nParam, char **szParam);
  94. BOOL GetCLIArg(char *szArg, int *nParam, char **szParam);
  95. BOOL SetupToolTypeArg(char *szOptFileName);
  96. BOOL GetToolTypeArg(char *szArg, int *nParam, char **szParam);
  97. BOOL IsKeyword(char * szWord);
  98. BOOL CreatePhoneMenus(BOOL BCreate);
  99. BOOL SafePutToPort(struct Message * message, char * portname);
  100. BOOL CanAdjustLineGain(void);
  101. BOOL CanAdjustMicGain(void);
  102. BOOL CanAdjustInputChannel(void);
  103. BOOL CanAdjustInputSource(void);
  104. BOOL CanAmplify(void);
  105. BOOL CanMeasureVolume(void);
  106. BOOL UsesInvertedSamples(void);
  107. BOOL UsesCIAInterrupt(void);
  108. BOOL StartSoundPlayer(char * szFileName);
  109. BOOL HandleIDCMP(struct IntuiMessage * fakeMessage);
  110. BOOL FakeIDCMPMessage(ULONG class, ULONG code, ULONG qual);
  111.  
  112.  
  113. UBYTE ParseCompMode(char * szString);
  114. UBYTE ParseSamplerType(char * szParam);
  115. UBYTE ParseInputChannel(char * szParam);
  116.  
  117. int main(int largc, char *largv[]);
  118.  
  119. LONG ChopValue(LONG ulVal, LONG ulLow, LONG ulHigh);
  120.  
  121. int MakeReq(char *sTitle, char *sText, char *sGadgets);
  122.  
  123. #endif
  124.